﻿using System.IO;
using System.Net.Sockets;

namespace Model
{
    public class User
    {
        public User(TcpClient client)
        {
            Client = client;
            NetworkStream networkStream = client.GetStream();
            Br = new BinaryReader(networkStream);
            Bw = new BinaryWriter(networkStream);
        }

        public TcpClient Client { get; private set; }
        public BinaryReader Br { get; private set; }
        public BinaryWriter Bw { get; private set; }

        public void Close()
        {
            Br.Close();
            Bw.Close();
            Client.Close();
        }
    }
}